<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>All Drivers</title>
    </h:head>
    <h:body>
        <f:view>
            <h:form>
            <h:dataTable value="#{driver.drivers}" border="1" var="driver">
                <f:facet name="header">
                    <h:outputText value="List of Drivers"/>
                </f:facet>
                <h:column id="column1">
                    <f:facet name="header">
                        <h:outputText value="ID"/>
                    </f:facet>
                    <h:outputText value="#{driver.id}"/>
                </h:column>
                <h:column id="column2">
                    <f:facet name="header">
                        <h:outputText value="Name"/>
                    </f:facet>
                    <h:outputText value="#{driver.name}"/>
                </h:column>
                <h:column id="column3">
                    <f:facet name="header">
                        <h:outputText value="E-Mail"/>
                    </f:facet>
                    <h:outputText value="#{driver.email}"/>
                </h:column>
                <h:column id="column4">
                    <f:facet name="header">
                        <h:outputText value="Phone Number"/>
                    </f:facet>
                    <h:outputText value="#{driver.phoneNumber}"/>
                </h:column>
                <h:column id="column5">
                    <f:facet name="header">
                        <h:outputText value="Edit"/>
                    </f:facet>
                    <h:commandButton value="Edit" action="#{driver.editDriver}">
                        <f:param name="editableDriver" value="editableDriver"/>
                    </h:commandButton>
                </h:column>
                <h:column id="column6">
                    <f:facet name="header">
                        <h:outputText value="Delete"/>
                    </f:facet>
                    <h:commandButton value="Delete" action="#{driver.deleteDriver}"/>
                </h:column>
            </h:dataTable>
            </h:form>
        </f:view> 
    </h:body>
</html>

